#!/usr/env/bin python
# -*- coding: utf-8 -*-

# @Time    : 2018/11/21 10:57
# @Author  : yangdy
# @Email   : yangdy@egu360.com
# @File    : summarize.py
# @Software: PyCharm


def work(arr):
    add = 0
    remove = 0
    for x in arr:
        add += x[0]
        remove += x[1]

    return add, remove


a = [(534, 141), (438, 51), (829, 109), (2528, 954), (1023, 191), (629, 412), (766, 427), (501, 208), (697, 187),
     (104, 38), (686, 206), (562, 280), (553, 203), (425, 94), (225, 83), (232, 52), (228, 19), (177, 72), (211, 71)]

print(a)
print(work(a))

b = [(635, 265), (592, 245), (141, 102), (251, 13), (339, 3), (62, 1), (418, 0), (71, 2), (495, 3)]

print(b)
print(work(b))

# 周报
# 业务系统
crm = 3+2.6+3+4.2+2.9+3+2+1.5+4+3.6+3.6+4.3+3+3.7+3+3.3+4+0.5+1
# 微信小程序
weixin = 0.5+1.5+1.7+0.5
# 周统计
week = 0.5+0.4+0.3+0.3+0.3+0.2+0.2+0.2+0.2+0.2+0.2+0.2+0.2+0.2+0.2+0.2+0.2+0.2+0.2+0.2
# 官网
egu = 1+3.8
# 开发文档
doc_dev = 0.5+0.3+0.3
# 数据月报
doc_month = 0.5+0.5+0.5+0.3+0.5
# 操作手册
doc_manuel = 1+1.5+1.3+0.8+1+0.3+0.4
# 调研文档 百晓商机+侠客岛
doc_xiake = 0.3
# 调研 葡萄城+奥威
search = 0.2+0.2
# 个人电脑环境
mine_computer = 0.5+0.5
# 面试 甜甜同学-游弘扬 前端面试 温静
interview = 0.3+0.5+0.3
# 数字e谷
egu_report = 0.4
# 技术储备
learn_egu = 1+0.8+0.6+3.3+1.8+0.8
# 季度计划
plan = 0.8

# TAPD
# 官网
egu += 4.3+4.2+3.9+1.2+2.5+1.2+4.2+3+2.5+4+4.3+3.3+2.3+3.7+4.4+4+4+4.5+3.8+4.5+4.4+4+4+3.3+3.9+3.3+1
# 技术储备官网
learn_egu += 0.8
# 技术储备 园区管理系统
learn_bms = 0.8+0.8+1.2
# 业务系统
crm += 0.2+3.6+0.8+2+0.6+0.8+1.5+0.8+0.3+2+0.6+0.2+0.8+0.3+0.3
# 工作统计
week += 0.2+0.2+0.2+0.2+0.2+0.2+0.2+0.2+0.2+0.2+0.2+0.2+0.2+0.2+0.2+0.2+0.2+0.2+0.2+0.2+0.2
# 微信小程序
weixin += 0.3
# 抽号小程序 齐河七夕
program = 0.7+0.5
# OA常用链接
egu += 0.4
# 数字e谷 走访图表
crm += 0.3
# 工作汇报 半年
work = 1+1
# 季度计划
plan += 0.5+0.5+0.4+0.5+0.3+0.2
# 数据月报
doc_month += 0.5+0.5+0.5+0.5+0.5+0.5
# 信息化研讨会
meet = 0.2+0.3
# 信息化支持 运营办数据
support = 0.4
# 团队组建 实习生
member = 0.2+0.3+0.2+0.3+0.3
# 百度搜索词
baidu_word = 0.4+0.2+0.1
# 服务器
server = 0.4+0.4+0.2+0.2+0.2
# TAPD
tapd = 0.5+0.3
# 年度总结 1
# 团建费用 1
# 代码仓库迁移
code = 1
# 办公室网络
network = 0.3

#
time_dev = crm
print('crm', crm)
time_dev += egu
print('egu', egu)
time_dev += weixin
print('weixin', weixin)
time_dev += program
print('program', program)
# learn
learn = learn_egu + learn_bms
print('learn', learn)
time_dev += learn

# 数字e谷
egu_report += search
print('egu_report', egu_report)

time_dev += egu_report

print(egu/time_dev, crm/time_dev, learn/time_dev, weixin/time_dev, program/time_dev, egu_report/time_dev)
# doc
doc = doc_month + doc_manuel + doc_dev + doc_xiake
print('doc', doc)
time_doc = doc

# 信息办工作
# 工作统计
print('week', week)
time_xxb = week
# 面试
print('interview', interview)
time_xxb += interview
# 季度计划
print('plan', plan)
time_xxb += plan
# 研讨会
print('meet', meet)
time_xxb += meet
# 支持
print('support', support)
time_xxb += support
# 团队组建
print('member', member)
time_xxb += member
# 百度搜索词
print('baidu_word', baidu_word)
time_xxb += baidu_word
# tapd
print('TAPD', tapd)
time_xxb += tapd
# 办公室网络
print('network', network)
time_xxb += network

# 系统服务器
# 代码仓库
print('code', code)
time_server = code
# 服务器
print('server', server)
time_server += server

time_learn = 16

total = time_dev + time_learn + time_xxb + time_doc + time_server
print(time_dev, time_learn, time_xxb, time_doc, time_server)

print(time_dev/total, time_learn/total, time_xxb/total, time_doc/total, time_server/total)




